package me.zhengjie.modules.detail.domain;

import me.zhengjie.base.CommonModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;

/**
* @author TianI
* @date 2022-02-15
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("real_estate_project_detail")
public class RealEstateProjectDetail extends CommonModel<RealEstateProjectDetail> implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "房产项目详情主键id")
    @TableId(type= IdType.ASSIGN_ID)
    private Long realEstateProjectDetailId;

    @ApiModelProperty(value = "关联房产项目")
    private Long realEstateProjectId;

    @ApiModelProperty(value = "房产分类")
    private String propertyCategory;

    @ApiModelProperty(value = "房产特色")
    private String projectFeatures;

    @ApiModelProperty(value = "建筑类别")
    private String buildingCategory;

    @ApiModelProperty(value = "装修状况")
    private String decorateSituation;

    @ApiModelProperty(value = "开发商")
    private String propertyDevelopers;

    @ApiModelProperty(value = "项目地址")
    private String projectAddress;

    @ApiModelProperty(value = "咨询电话")
    private String consultingTelephone;

    @ApiModelProperty(value = "交付时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private String deliverTime;

    @ApiModelProperty(value = "是否在售")
    private Integer onSale;

    @ApiModelProperty(value = "售楼地址")
    private String saleAddress;

    @ApiModelProperty(value = "占地面积")
    private String floorSpace;

    @ApiModelProperty(value = "建筑面积")
    private String coveredArea;

    @ApiModelProperty(value = "容积率")
    private String plotRatio;

    @ApiModelProperty(value = "绿化率")
    private String greeningRate;

    @ApiModelProperty(value = "停车位总数")
    private String parkingSpaceTotal;

    @ApiModelProperty(value = "楼栋总数")
    private String buildingTotal;

    @ApiModelProperty(value = "总户数")
    private String householdsTotal;

    @ApiModelProperty(value = "物业公司名称")
    private String propertyCompanyName;

    @ApiModelProperty(value = "物业费")
    private String propertyFee;

    @ApiModelProperty(value = "楼层状况")
    private String floorCondition;

    @ApiModelProperty(value = "项目简介")
    private String projectBrief;

    @ApiModelProperty(value = "楼盘价格左区间")
    private BigDecimal minimumPrice;

    @ApiModelProperty(value = "楼盘价格右区间")
    private BigDecimal maximumPrice;

    @ApiModelProperty(value = "价格单位")
    private String priceUnit;

    @ApiModelProperty(value = "开盘时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private String openTime;

    @ApiModelProperty(value = "备案名")
    private String recordName;

    @ApiModelProperty(value = "房产项目标签")
    private String projectLabel;

    @ApiModelProperty(value = "房产项目名称")
    private String realEstateProjectName;

    @ApiModelProperty(value = "房产项目纬度")
    private String latitude;

    @ApiModelProperty(value = "房产项目经度")
    private String longitude;

    public void copyFrom(RealEstateProjectDetail source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
